//
//  BrokerInfoModel.m
//  WGFGlobalHouses
//
//  Created by waiguofang on 15/5/22.
//  Copyright (c) 2015年 waiguofang. All rights reserved.
//

#import "BrokerInfoModel.h"
#import "StringTool.h"
#import "API.h"

#define ImgeForwardUrl2 @"http://files.wgfcdn.com/"

@implementation BrokerInfoModel

-(instancetype)initWithDic:(NSDictionary *)dic;
{
    if (self = [super init])
    {
        self.brokerId = dic[@"brokerId"] ;
       
        
        self.consumers = [dic[@"consumers"]integerValue];
        self.realname = dic[@"realname"];
        self.orders = [dic[@"orders"]integerValue];
        self.brokerages = dic[@"brokerages"];
        self.validateName = dic[@"validateName"];
        self.tel = dic[@"tel"];
        
        if ([StringTool isBlankString:dic[@"avatar"]]) {
            
            self.avatar = @"";
        }else{
            
            self.avatar = [API videoUrlMake:dic[@"avatar"]];
        }
        
        self.city = dic[@"city"];
        self.mail = dic[@"mail"];
        self.mobile =dic[@"mobile"];
        self.area = dic[@"area"];
        self.company = dic[@"company"];
        self.nickname = dic[@"nickname"];
        self.cityName = dic[@"cityName"];
        self.areaName = dic[@"areaName"];
        self.validate = [dic[@"validate"]integerValue];
        self.address = dic[@"address"];
    }
    return self;
}
+(instancetype)brokerWithDic:(NSDictionary *)dic;
{
    return [[self alloc]initWithDic:dic];
}

@end
